package com.huoyun.car.service;

import java.util.List;

import com.huoyun.car.bean.Car;
import com.huoyun.car.model.CarDriverOwnerModel;
import com.huoyun.car.model.CarModel;
import com.huoyun.car.model.CarUserCompanyModel;
import com.huoyun.car.service.evt.QueryCarEvt;

public interface CarService {

	public void saveCar(Car car);

	public List<Car> getCarList(long userId);

	public Car getCarById(long carId);

	public String getDefaultContactByPlateNumber(String pNumber);

	public void updateAll(Car car);

	public void delete(long carId);

	public List<Car> getUnPublishedCarListByUserId(long userId);

	// public List<Car> getCarListByLoadMaxForUser(long userId, String loadMax);

	public List<Car> getCarListByUsername(String username);

	public String getDriverTelephoneByDriverId(long driverId);

	public List<Car> getCarListForCargoByAmount(long userId, String amount, long goodsId);

	public CarDriverOwnerModel getCarDriverOwnerModelByCarId(long id);

	/**
	 * 根据车牌号查找车辆信息
	 * 
	 * @param carNumber
	 * @return 车辆信息
	 */
	public Car getCarByCarNumber(String carNumber);

	public long queryCarCount(QueryCarEvt queryCarEvt);

	/**
	 * 根据用户id获取详细车辆列表
	 * 
	 * @param userId
	 * @return 详细车辆列表
	 * @author ChengXin
	 */
	public List<CarModel> getCarModelListByUserId(long userId);
	

	/**
	 * 获取最新注册的n辆车
	 * @param topN
	 * @return
	 * @author yang
	 */
	public List<CarUserCompanyModel> getLatestNCar(long topN);
}
